public class Text2 {
    public ListNode FindKthToTail (ListNode pHead, int k) {
        // write code here
        if(pHead == null){
            return null;
        }
        ListNode slow = pHead;
        ListNode fast = pHead;
        while(k-1 != 0){
            fast = fast.next;
            if(fast == null){
                return null;
            }
            k--;
        }

        while(fast.next != null){
            fast = fast.next;
            slow = slow.next;
        }

        return slow;
    }
}
